home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / AIncludes / Signal.a < prev    next >
Encoding:
Text File  |  1988-11-30  |  1.4 KB  |  49 lines  |  [TEXT/MPS ]

  1. ;  File Signal.a
  2. ;
  3. ;  Copyright Apple Computer, Inc. 1986, 1988
  4. ;  All rights reserved.
  5. ;
  6. ;  Include File for Signal processing in the MPW Environment
  7.  
  8. ;  Set CASE OBJECT to assure references to the names IMPORTed here link
  9. ;  properly.  The following statements restore the CASE setting to its
  10. ;  previous value.
  11.  
  12.             PRINT            Push,Off            ; save the current print settings and turn it off
  13.             GBLC            &S%%%%,&P%%%%
  14. &S%%%%        SETC            &Setting('CASE')    ; save the current CASE setting
  15. &P%%%%        SETC            &Setting('PRINT',1) ; and the PRINT settings before we changed them
  16.  
  17.             MACRO                
  18.             X%%%%
  19.             GBLC            &S%%%%,&P%%%%        ; link references with previously defined variables
  20.             PRINT            Push,&P%%%%         ; restore the previous PRINT settings
  21.             CASE            &S%%%%                ; and restore the CASE setting
  22.             PRINT            POP                 ; restore the PRINT settings
  23.             ENDM
  24.  
  25.             PRINT            Pop                 ; restore the PRINT settings
  26.             CASE            OBJECT                ; all imported/exported names case significant
  27.  
  28.  
  29. SIG_DFL        EQU             1
  30. SIG_ERR        EQU             -1
  31. SIG_IGN        EQU             0
  32. SIG_HOLD    EQU             3
  33. SIG_RELEASE    EQU             5
  34.  
  35. SIGABRT        EQU             $0001
  36. SIGINT        EQU             $0002
  37. SIGFPE        EQU             $0004
  38. SIGILL        EQU             $0008
  39. SIGSEGV        EQU             $0010
  40. SIGTERM        EQU             $0020
  41.  
  42.             IMPORT            signal
  43.             IMPORT            raise
  44.  
  45.             PRINT            Push,Off            ; save and turn off PRINT when macro is invoked
  46.             X%%%%                                ; invoke the macro to restore CASE setting
  47.             PRINT            POP                 ; restore the PRINT settings
  48.  
  49.